package com.kfm.base.ex;

public class List {

    Object[] arr;

    int size;

    public List() throws Exception {

    }


    public Object get(int index) throws RuntimeException {
        // index -1  10
        if (index < 0 || index >= size){
            throw new IndexOutOfBoundsException("下标越界, " + index);
        }
        return arr[index];
    }
}

class A extends List{

    public A() throws Exception {
        super();
    }

    @Override
    public Person get(int index) throws NullPointerException {
        return null;
    }
}
